<?php
class DownAction extends Action{
	
	
	public function index(){
		$top_banner = model("Xdata")->getConfig("top_banner","appDownMain","admin_Config");
		$android_url = model("Xdata")->getConfig("android_url","appDownMain","admin_Config");
		$ios_url = model("Xdata")->getConfig("ios_url","appDownMain","admin_Config");
		$buttom_banner = model("Xdata")->getConfig("buttom_banner","appDownMain","admin_Config");
		$content = model("Xdata")->getConfig("content","appDownMain","admin_Config");
		$this->assign('top_banner',$this->getImage($top_banner));
		$this->assign('android_url',$android_url);
		$this->assign('ios_url',$ios_url);
		$this->assign('buttom_banner',$this->getImage($buttom_banner));
		$this->assign('content',$content);
		$this->display();
	
	}
	
	public function getImage($id){
		$attach = M('Attach');
		$find = $attach->where("attach_id = $id")->find();
		$image = $find['save_path'].$find['save_name'];
		$result = getImageUrl($image);
		return $result;
	}
	
	
	
	
	
}